﻿using System;
using System.Web;

namespace TQB.Plugin.HttpModule
{
    public class TestHttpsWriteModule : IHttpModule
    {

        #region IHttpModule Members

        public void Dispose()
        {
            //throw new NotImplementedException();
        }

        public void Init(HttpApplication context)
        {
            context.BeginRequest += new EventHandler(context_BeginRequest);
        }

        void context_BeginRequest(object sender, EventArgs e)
        {
            //HttpApplication context = (HttpApplication)sender;
            //if (!context.Request.IsSecureConnection)
            //{
            //    string url = context.Request.Url.AbsoluteUri.Replace("http", "https");
            //    context.Response.Redirect(url, true);
            //}
        }

        #endregion
    }
}
